package com.fingard.dsp.bank.reqrespobj.quotecheck;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.dsp.bank.reqrespobj.quotecheck.detail.RetAtsQuoteCheck;
import com.fingard.xml.XmlTextWriter;

public class ReqAtsAQ01BalQry  extends RetAtsBase {
    public ReqAtsAQ01BalQry(ReqRespHeader p_header) {
        retHeader = p_header;
        retXmlWriter = new XmlTextWriter();//用于输出返回ATS的XML报文
    }
    private int writeRdCount = 0;

    public int getWrittenRdCount() {
        return writeRdCount;
    }

    public void writeRetDetail(RetAtsQuoteCheck p_retDetail) throws Exception {
        writeRdCount++;
        if (writeRdCount == 1) {
            if (!hasWrittenRespCode) {
                writeRespCode("0");
            }
            if (!hasWrittenRespInfo) {
                writeRespInfo("");
            }
        }
        retXmlWriter.writeElementString("loginStatus", p_retDetail.loginStatus);
        retXmlWriter.writeElementString("systemStatus", p_retDetail.systemStatus);
        retXmlWriter.writeElementString("littleLimit", p_retDetail.littleLimit);
        retXmlWriter.writeEndElement();

    }
}
